import { ref } from "vue";

export function useCheckBox() {
    const checked = ref(true)

    const handleChange = (val) => {
        console.log(val);
    }

    const cities = ref(['上海', '北京', '天津']) //这种不能用reactive 地址赋值后第二次就不能更改了
    const checkboxGroup1 = ref(['上海'])
    const handleGroup = (val) => {
        console.log(val)
    }
    return {
        checked,
        handleChange,
        checkboxGroup1,
        cities,
        handleGroup
    }
}